package data;

import models.Student;

import org.sql2o.Sql2o;

public class StudentDAO implements IStudentDAO{
	private static Sql2o database;
	static {
		database = new Connection().open();
	}
	public Student get(int id) {
		String sql = "select * from Person where id = :id";
		return database.createQuery(sql).addParameter("id", id).executeAndFetchFirst(Student.class);
	}
}
